﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.Master" AutoEventWireup="true"
    CodeBehind="ProductAdd.aspx.cs" Inherits="HuaProject.Web.Admin.ProductAdd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../css/Adminstyle.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        jQuery(function () {
            $("input[type='text']").bind('blur', function () {
                Check();
            });
        });


        function Check() {
            if ($("#<%=txtTitle.ClientID %>").val() == "") {
                $("#<%=txtTitle.ClientID %>").css("border", "solid 1px #F00");
                return false;
            }
            else {
                $("#<%=txtTitle.ClientID %>").css("border", "");
            }
            if ($("#<%=FileUpload1.ClientID %>").val() == "") {
                $("#<%=FileUpload1.ClientID %>").css("border", "solid 1px #F00");
                return false;
            }
            else {
                $("#<%=FileUpload1.ClientID %>").css("border", "");
            }
            if ($("#<%=txtCoding.ClientID %>").val() == "") {
                $("#<%=txtCoding.ClientID %>").css("border", "solid 1px #F00");
                return false;
            }
            else {
                $("#<%=txtCoding.ClientID %>").css("border", "");
            }
            if ($("#<%=txtHoleSize.ClientID %>").val() == "") {
                $("#<%=txtHoleSize.ClientID %>").css("border", "solid 1px #F00");
                return false;
            }
            else {
                $("#<%=txtHoleSize.ClientID %>").css("border", "");
            }
            if ($("#<%=txtPower.ClientID %>").val() == "") {
                $("#<%=txtPower.ClientID %>").css("border", "solid 1px #F00");
                return false;
            }
            else {
                $("#<%=txtPower.ClientID %>").css("border", "");
            }
            if ($("#<%=txtVoltage.ClientID %>").val() == "") {
                $("#<%=txtVoltage.ClientID %>").css("border", "solid 1px #F00");
                return false;
            }
            else {
                $("#<%=txtVoltage.ClientID %>").css("border", "");
            }

            if ($("#<%=txtRating.ClientID %>").val() == "") {
                $("#<%=txtRating.ClientID %>").css("border", "solid 1px #F00");
                return false;
            }
            else {
                $("#<%=txtRating.ClientID %>").css("border", "");
            }
            if ($("#<%=txtTemperature.ClientID %>").val() == "") {
                $("#<%=txtTemperature.ClientID %>").css("border", "solid 1px #F00");
                return false;
            }
            else {
                $("#<%=txtTemperature.ClientID %>").css("border", "");
            }
            if ($("#<%=txtMaterial.ClientID %>").val() == "") {
                $("#<%=txtMaterial.ClientID %>").css("border", "solid 1px #F00");
                return false;
            }
            else {
                $("#<%=txtMaterial.ClientID %>").css("border", "");
            }
        }
    </script>
    <table class="tb tb2 ">
        <tbody>
            <tr>
                <th class="partition" colspan="15">
                    商品管理 - 添加产品
                </th>
            </tr>
            <tr>
                <td s="1" class="td27" colspan="2">
                    产品名称:
                </td>
            </tr>
            <tr class="noborder">
                <td class="vtop rowform">
                    <asp:TextBox ID="txtTitle" CssClass="txt" runat="server"></asp:TextBox>
                </td>
                <td s="1" class="vtop tips2">
                    *必填
                </td>
            </tr>
            <tr>
                <td s="1" class="td27" colspan="2">
                    产品图片:
                </td>
            </tr>
            <tr class="noborder">
                <td class="vtop rowform">
                    <asp:FileUpload ID="FileUpload1" CssClass="txt uploadbtn marginbot" runat="server" />
                </td>
                <td s="1" class="vtop tips2">
                    *必填
                </td>
            </tr>
            <tr>
                <td s="1" class="td27" colspan="2">
                    商家编码:
                </td>
            </tr>
            <tr class="noborder">
                <td class="vtop rowform">
                    <asp:TextBox ID="txtCoding" CssClass="txt" runat="server"></asp:TextBox>
                </td>
                <td s="1" class="vtop tips2">
                    *必填
                </td>
            </tr>
            <tr>
                <td s="1" class="td27" colspan="2">
                    产品类别:
                </td>
            </tr>
            <tr class="noborder">
                <td class="vtop rowform">
                    <asp:DropDownList ID="ddlType" runat="server">
                    </asp:DropDownList>
                </td>
                <td s="1" class="vtop tips2">
                    *必填<br>
                    <span style="color: #F00" class="smalltxt"></span>
                </td>
            </tr>
            <tr>
                <td s="1" class="td27" colspan="2">
                    开孔尺寸:
                </td>
            </tr>
            <tr class="noborder">
                <td class="vtop rowform">
                    <asp:TextBox ID="txtHoleSize" CssClass="txt" runat="server"></asp:TextBox>
                </td>
                <td s="1" class="vtop tips2">
                    *必填
                </td>
            </tr>
            <tr>
                <td s="1" class="td27" colspan="2">
                    灯具功率:
                </td>
            </tr>
            <tr class="noborder">
                <td class="vtop rowform">
                    <asp:TextBox ID="txtPower" CssClass="txt" runat="server"></asp:TextBox>
                </td>
                <td s="1" class="vtop tips2">
                    *必填
                </td>
            </tr>
            <tr>
                <td s="1" class="td27" colspan="2">
                    输入电压:
                </td>
            </tr>
            <tr class="noborder">
                <td class="vtop rowform">
                    <asp:TextBox ID="txtVoltage" CssClass="txt" runat="server"></asp:TextBox>
                </td>
                <td s="1" class="vtop tips2">
                    *必填
                </td>
            </tr>
            <tr>
                <td s="1" class="td27" colspan="2">
                    可选颜色:
                </td>
            </tr>
            <tr class="noborder">
                <td class="vtop rowform">
                    <asp:CheckBoxList ID="cblColors" runat="server" RepeatDirection="Horizontal" RepeatColumns="6">
                        <asp:ListItem Value="Maroon" Selected="True"><font style="color:Maroon;font-size:25px;">●</font> </asp:ListItem>
                        <asp:ListItem Value="Aqua"><font style="color:Aqua;font-size:25px;">●</font> </asp:ListItem>
                        <asp:ListItem Value="Navy" Selected="True"><font style="color:Navy;font-size:25px;">●</font> </asp:ListItem>
                        <asp:ListItem Value="Olive"><font style="color:Olive;font-size:25px;">●</font> </asp:ListItem>
                        <asp:ListItem Value="Orange"><font style="color:Orange;font-size:25px;">●</font> </asp:ListItem>
                        <asp:ListItem Value="Purple"><font style="color:Purple;font-size:25px;">●</font> </asp:ListItem>
                        <asp:ListItem Value="Red"><font style="color:Red;font-size:25px;">●</font> </asp:ListItem>
                        <asp:ListItem Value="Silver"><font style="color:Silver;font-size:25px;">●</font> </asp:ListItem>
                        <asp:ListItem Value="Teal"><font style="color:Teal;font-size:25px;">●</font> </asp:ListItem>
                        <asp:ListItem Value="White" Selected="True"><font style="color:White;font-size:25px;">●</font> </asp:ListItem>
                        <asp:ListItem Value="Yellow" Selected="True"><font style="color:Yellow;font-size:25px;">●</font> </asp:ListItem>
                        <asp:ListItem Value="Green" Selected="True"><font style="color:Green;font-size:25px;">●</font> </asp:ListItem>
                    </asp:CheckBoxList>
                </td>
                <td s="1" class="vtop tips2">
                    *必填
                </td>
            </tr>
            <tr>
                <td s="1" class="td27" colspan="2">
                    防护等级:
                </td>
            </tr>
            <tr class="noborder">
                <td class="vtop rowform">
                    <asp:TextBox ID="txtRating" CssClass="txt" runat="server"></asp:TextBox>
                </td>
                <td s="1" class="vtop tips2">
                    *必填
                </td>
            </tr>
            <tr>
                <td s="1" class="td27" colspan="2">
                    环境温度:
                </td>
            </tr>
            <tr class="noborder">
                <td class="vtop rowform">
                    <asp:TextBox ID="txtTemperature" CssClass="txt" runat="server"></asp:TextBox>
                </td>
                <td s="1" class="vtop tips2">
                    *必填
                </td>
            </tr>
            <tr>
                <td s="1" class="td27" colspan="2">
                    外壳材质:
                </td>
            </tr>
            <tr class="noborder">
                <td class="vtop rowform">
                    <asp:TextBox ID="txtMaterial" CssClass="txt" runat="server"></asp:TextBox>
                </td>
                <td s="1" class="vtop tips2">
                    *必填
                </td>
            </tr>
        </tbody>
        <tbody>
            <tr>
                <td colspan="15">
                    <div class="fixsel">
                        <asp:Button ID="Button1" CssClass="btn" runat="server" OnClientClick="return Check();"
                            Text="提交" OnClick="Button1_Click" />
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</asp:Content>
